{extend name="base"/}

{block name="box"}
<div class="fly-home fly-panel" style="background-image: url();">
    {if condition="empty($userinfo.image)"}
    <img src="__STATIC__/head.jpg" alt="{{$userinfo.name}}">
    {else/}
    <img src="{{:get_img_url('__STATIC__/../upload/headImg/',$userinfo['image'],0)}}" alt="{{$userinfo.name}}">
    {/if}
    <!--<i class="iconfont icon-renzheng" title="Fly社区认证"></i>-->
    <h1>
        {{$userinfo.name}}
        {eq name="$userinfo.sex" value="0"}
            <i class="iconfont icon-nan"></i>
        {else/}
            <i class="iconfont icon-nv"></i>
        {/eq}
        <!--<i class="iconfont icon-nan"></i>-->
        <!-- <i class="iconfont icon-nv"></i>  -->
        <i class="layui-badge fly-badge-vip">
            {switch name="$userinfo.level"}
                {case value="0"}普通用户{/case}
                {case value="1"}VIP1{/case}
                {case value="2"}VIP2{/case}
                {case value="3"}VIP3{/case}
                {case value="4"}VIP4{/case}
                {case value="5"}VIP5{/case}
            {/switch}
        </i>
        <!--
        <span style="color:#c00;">（管理员）</span>
        <span style="color:#5FB878;">（社区之光）</span>
        <span>（该号已被封）</span>
        -->
    </h1>

    <!--<p style="padding: 10px 0; color: #5FB878;">认证信息：layui 作者</p>-->

    <p class="fly-home-info">
        <span class="fly-list-kiss layui-hide-xs" title="悬赏金币">
                                                <!--<i class="iconfont icon-kiss"></i>-->
                                                <i class="layui-icon" style="font-size: 18px; color: red;">&#xe65e;</i>
                                                {{$userinfo.gold}} 金币</span>
        <i class="iconfont icon-shijian"></i><span>{{:substr($userinfo.create_time,0,10)}} 加入</span>
        <i class="iconfont icon-chengshi"></i><span>来自
            {if condition="empty($userinfo.city)"}未知{else/}{{$userinfo.city}}{/if}
        </span>
    </p>

    <p class="fly-home-sign">
        {if condition="empty($userinfo.sign)"}无{else/}{{$userinfo.sign}}{/if}
    </p>

    <!--<div class="fly-sns" data-user="">-->
        <!--<a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>-->
        <!--<a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>-->
    <!--</div>-->

</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md5 fly-home-jie">
            <div class="fly-panel">
                <h3 class="fly-panel-title">{{$userinfo.name}} 最近的发帖</h3>
                <ul class="jie-row">
                    {if condition="!empty($cardList)"}
                        {foreach name="cardList" item="val"}
                            <li>
                                {eq name="$val.is_fine" value="1"}
                                    <span class="fly-jing">精</span>
                                {/eq}

                                <a href="{{:url('Card/cardBrowse',['id'=>$val.id])}}" class="jie-title">{{$val.name}}</a>
                                <i class="time">{{:substr($val.create_time,0,10)}}</i>
                                <em class="layui-hide-xs">{{$val.browse}}&nbsp;阅&nbsp;/&nbsp;{{$val.evaluate_num}}&nbsp;答</em>
                            </li>
                        {/foreach}
                        <!--分页显示-->
                        {{$cardPage}}
                    {else/}
                        <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">没有发表任何求解</i></div>
                    {/if}
                    <!--<li>-->
                        <!--<span class="fly-jing">精</span>-->
                        <!--<a href="" class="jie-title"> 基于 layui 的极简社区页面模版</a>-->
                        <!--<i>刚刚</i>-->
                        <!--<em class="layui-hide-xs">1136阅/27答</em>-->
                    <!--</li>-->


                </ul>
            </div>
        </div>

        <div class="layui-col-md7 fly-home-da">
            <div class="fly-panel">
                <h3 class="fly-panel-title">{{$userinfo.name}} 最近的回答</h3>
                <ul class="home-jieda">
                    {if condition="!empty($evalList)"}
                        {foreach name="evalList" item="val"}
                            <li>
                            <p>
                                <span>{{:substr($val.create_time,0,10)}}</span>
                                在<a href="{{:url('Card/cardBrowse',['id'=>$val.card_id])}}">{{$val.name}}</a>中回答：
                            </p>
                            <div class="home-dacontent">{{$val.eval_content}}</div>
                        </li>
                        {/foreach}
                    <!--分页显示-->
                    {{$evalPage}}

                    {else/}
                        <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div>
                    {/if}
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="fly-footer">
    <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
    <p>
        <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
        <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
        <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
    </p>
</div>
{/block}